using MicroMsg.Plugin.Sns.Scene;
using System;
using System.Data.Linq;
using System.Data.Linq.Mapping;
namespace MicroMsg.Storage
{
	[Table]
	public class SnsTrans : StorageItem
	{
		[Column(IsPrimaryKey = true)]
		public int nTransID;
		[Column]
		public string strObjectID;
		[Column]
		public int nLocalID;
		[Column]
		public int nObjectstatus;
		[Column]
		public string strClientID;
		[Column]
		public uint nSyncFlag;
		[Column(DbType = "Image")]
		public byte[] bytesXmlData;
		[Column(IsVersion = true)]
		private Binary _version;
		private SnsMediaTransList _snsImgTransList;
		public SnsMediaTransList snsImgTransList
		{
			get
			{
				if (this._snsImgTransList != null)
				{
					return this._snsImgTransList;
				}
				if (this.bytesXmlData != null)
				{
					this._snsImgTransList = StorageXml.loadFromBuffer<SnsMediaTransList>(this.bytesXmlData);
				}
				return this._snsImgTransList;
			}
			set
			{
				this._snsImgTransList = value;
				this.bytesXmlData = StorageXml.saveToBuffer<SnsMediaTransList>(this._snsImgTransList);
			}
		}
	}
}
